<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>视频列表</title>
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<import type='js' file="js.main" />
</head>

<body>
<div class="main-frame">
    <div class="position">微电影 > 视频列表</div>
    
    <div class="position-content">
		<form name="form3" id="form3" method="post" action="{:U('wfilmsearch')}">
			<label>微电影视频搜索：</label>
			<input name="key" class="searchkey skeyma" style="height:22px; line-height:22px; padding:0px 10px;" placeholder="搜索微电影视频"></input>
			<input class="searchbtn searchma" style="height:26px; line-height:26px;" type="submit" name="search" value="微电影搜索"></input>
		</form>
	</div>
	
    <div class="table-list">
        <table width="100%" border="1" cellspacing="0" cellpadding="0" class="indextable">
            <tr class="th-bg">
                <th width="5%">ID</th>
                <th width="45%">标题</th>
                <th width="15%">分类</th>
                <th width="5%">状态</th>
                <th width="10%">添加时间</th>
                <th width="12%">操作</th>
            </tr>
            <volist name='list' id='v' empty="$empty">
                <tr class="tr-line">
                    <td>{$v['id']}</td>
                    <td>{$v['wfilm_title']}</td>
                    <td>{$v['typename']}</td>
                    <td><if condition="$v['state'] neq 1"><span class="tclose" title="关闭"></span><else /><span class="topen" title="正常"></span></if></td>
                    <td>{$v['pubdate']}</td>
                    <td><a href="{:U('edit',array('id'=>$v['id']))}">编辑</a><if condition="$v['state'] eq 1"> / <a class="resdel" refurl="{:U('delete',array('id'=>$v['id']))}">删除</a><else/> / <a class="resdel" refurl="{:U('renew',array('id'=>$v['id']))}">恢复</a></if></td>
                </tr>
            </volist>
        </table>
    </div>
    <div class="page">{$page}</div>
</div>
<script type="text/javascript">
    $(function(){
        $("a.resdel").each(function(index, element) {
            var t = $(this);
            t.click(function(){
                var r=confirm("想好！确定要删除吗？");
                if (r==true){
                    var refurl = $(this).attr('refurl');
                    location.href = refurl;
                }else{
                    return false;
                }
            })
        });
    })
</script>
</body>
</html>
